<div class="well">
	<blockquote>
		<h3 class="text-error">My Reservation - Detail</h3>
	</blockquote>
	<table class="table table-bordered" id="my_reservation_detail_block">
		<thead>
			<tr>
				<th>Flight No.</th>
				<th>Route</th>
				<th>Order Time</th>
				<th>Operation</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td><?php echo $order['flight']['flight_code'];?></td>
				<td><?php echo $order['flight']['from']['area']['name'] . ' → ' . $order['flight']['to']['area']['name'];?></td>
				<td><?php echo $order['order_datetime'];?></td>
				<td id="<?php echo $order['id'];?>"><?php if ($order['flag'] == 0):?><button class="btn btn-mini btn-danger" type="button" id="delete_order">Delete</button><?php else:?>-<?php endif;?></td>
			</tr>
		</tbody>
	</table>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th>Departure Date</th>
				<th>Departure Time</th>
				<th>Arrival Time</th>
				<th>Cabin Class</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td><?php echo $order['flight']['departure_date'];?></td>
				<td><?php echo $order['flight']['departure_time'];?></td>
				<td><?php echo $order['flight']['arrival_time'];?></td>
				<td><?php echo (($order['class'] == 'Y') ? 'Economy' : 'Prestige');?></td>
			</tr>
		</tbody>
	</table>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th>#</th>
				<th>Pasenger Name</th>
				<th>Certification Type</th>
				<th>Certification Number</th>
				<th>Passenger Type</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($order['passenger'] as $k => $passenger):?>
			<tr <?php if ($k % 2 == 0):?>class="info"<?php endif;?>>
				<td><?php echo ($k + 1);?></td>
				<td><?php echo $passenger['passenger_name'];?></td>
				
				<?php if ($passenger['certification_type'] == 1):?>
				<td>Identification Card</td>
				<?php elseif ($passenger['certification_type'] == 2):?>
				<td>Officer Certificate</td>
				<?php else:?>
				<td>-</td>
				<?php endif;?>
				
				<td><?php echo (($passenger['passenger_type'] != 'I') ? $passenger['certification_number'] : '-');?></td>
				
				<?php if ($passenger['passenger_type'] == 'A'):?>
				<td>Adult</td>
				<?php elseif ($passenger['passenger_type'] == 'C'):?>
				<td>Child</td>
				<?php else:?>
				<td>Infant</td>
				<?php endif;?>
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
</div>
